#include <iostream>
using namespace std;

void func3()
{
	try
	{
		int x = 0;
		if (x == 0)
		{
			throw x;
		}
	}
	catch (float a)
	{
		cout << "func3" << endl;
	}
}

void func2()
{
	try
	{
		func3();
	}
	catch (int x)
	{
		cout << "func2" << endl;
	}
}

void func1()
{
	try
	{
		func2();
	}
	catch (int x)
	{
		cout << "func1" << endl;
	}
}

int main()
{
	try
	{
		func1();
	}
	catch (char c)
	{
		cout << "main" << endl;
	}
	return 0;
}